<template>
  <div>
    <h1>son1</h1>
<!--    <button @click="fun1('哈哈')">点击我</button>-->
    <input type="text" v-model="title" @change="fun2">
  </div>
</template>

<script>
  export default {
    name: "Son",
    data() {
      return {
        title:""
      }
    },
    methods:{
      fun2:function(){
       this.fun1(this.title);
      }
    },
    props: { // 为了 实现 父子之间数据的通信
      fun1:Function
    }
  }
</script>

<style scoped>

</style>
